﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using DLV.Utilities;

namespace DLV.Data.Entities
{
    public class HotelTypeController
    {
        public int InsertHotelType(HotelTypeInfo info)
        {
            return SQL.InsertHotelType(info.HotelTypeName, info.CreatedBy, info.CreatedDate, info.UpdatedBy, info.UpdatedDate, info.Status);
        }
        public void UpdateHotelType(HotelTypeInfo info)
        {
            SQL.UpdateHotelType(info.HotelTypeId, info.HotelTypeName, info.CreatedBy, info.CreatedDate, info.UpdatedBy, info.UpdatedDate, info.Status);
        }
        public void DeleteHotelType(HotelTypeInfo info)
        {
            DeleteHotelType(info.HotelTypeId);
        }
        public void DeleteHotelType(int hotelTypeId)
        {
            SQL.DeleteHotelType(hotelTypeId);
        }
        public HotelTypeInfo GetHotelType(int hotelTypeId)
        {
            return CBO.FillObject<HotelTypeInfo>(SQL.GetHotelType(hotelTypeId));
        }
        public List<HotelTypeInfo> ListHotelType()
        {
            return CBO.FillCollection<HotelTypeInfo>(SQL.ListHotelType());
        }
        public DataTable SelectHotelType()
        {
            return CBO.ConvertToDataTable(ListHotelType(), typeof(HotelTypeInfo));
        }
    }
}
